﻿namespace WebDiagnostics.Extensions
{
    public static class StringExtensions
    {

        public static string ShortenFullTypeName(this string fullTypeName)
        {
            string shortenedName = fullTypeName;

            int lastPeriod = fullTypeName.LastIndexOf('.') + 1;
            if (lastPeriod > 0)
                shortenedName = fullTypeName.Substring(lastPeriod, fullTypeName.Length - lastPeriod);

            return shortenedName;
        }

    }
}
